import random;


# orig       return
# [A B C D]  []

# rint 3(0-3)
# choose D
#[A B C] [D]


# rint 1(0-2)
# choose B
#[A C]   [D B]

# rint 0 (0-1)
# choose A
#[C] [D B A]


# rint 0(0)
# choose C
#[] [D B A C]
def FisherYateShuffle(num):
    tmp = []
    
    for i in range(len(num)):
        
        kth = random.randint(0, len(num) - 1)
        tmp.append(num[kth])
        del num[kth]
    
    return tmp

# PShuffle
# [A B C D] 

# rint 2 (0~3)
# swap index 2 and 3

# [A B D C]

# rint 1 (0~2)
# swap index 1 and 2

#[A D B C]


# rint 0 (0~1)
#[swap index 0 and 1]

#[D A B C]



def PShuffle(num):
    
    
    sz = len(num)
    # for i in range(sz):
    #     kth = random.randint(0, sz - i - 1)
    #     num[kth],num[sz - i - 1] = num[sz - i - 1],num[kth]
        
    cnt = sz - 1
    while cnt > 0:
        kth  = random.randint(0, cnt)
        num[kth],num[cnt] = num[cnt],num[kth]
        cnt -= 1
    


if __name__ == "__main__":
    
    
    pris_num = list(range(1, 101))
   
    PShuffle(pris_num)
    print(pris_num)
    
    
    
    print("Hello")
